<!DOCTYPE HTML>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <script type="text/javascript" src="/lib/html5shiv.js"></script>
    <script type="text/javascript" src="/lib/respond.min.js"></script>
    <script type="text/javascript" src="/js/vue/vue.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/style.css" />
    <script type="text/javascript" src="/lib/respond.min.js"></script>
    <script href="/js/jquery/jquery.min.js"></script>
    <title>销售报表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 云分析 <span
        class="c-gray en">&gt;</span> 销售报表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                                              href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container" id="app"  >
    <div class="text-c"> <!--日期范围：
        <input type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin"
               class="input-text Wdate" style="width:120px;">
        -
        <input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })" id="datemax"
               class="input-text Wdate" style="width:120px;">-->
        <input type="text" class="input-text" style="width:250px" placeholder="输入单号或供应商编号" id="soNumber" name="">
        <button type="submit" class="btn btn-success" id="findempl" name=""><i class="Hui-iconfont">&#xe665;</i>搜索</button>
        <!--    <input type='button' value='柱状图 ' onclick="location.href = 'zhuzhuangtu.html'"/>-->
        <a href="/cargomanagement/purchase-order/zhuzhuangtu">柱状图</a>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
            <!--<a href="javascript:;" id="deletell"  class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
        <a href="javascript:;" onclick="addSales('添加','/cargomanagement/sales-order-history/ceshi1','800','500')"
           class="btn btn-primary radius">
        <i class="Hui-iconfont">&#xe600;</i> 添加销售订单历史</a>-->
        <a href="javascript:;" onclick="Excel_out()"
           class="btn btn-primary radius">
        <i class="Hui-iconfont">&#xe644;</i> Excel导出</a>
    </span>

        <span class="r">共有数据：<strong id="strong"></strong> 条</span></div>
    <div style="overflow: scroll;height: 500px"  >
        <table class="table table-border table-bordered table-bg">
            <thead>
            <tr>
                <th scope="col" colspan="9">订单列表</th>
            </tr>
            <tr class="text-c">
                <th width="40">ID</th>
                <th width="40">商品编号</th>
                <th width="130">商品名称</th>
                <th width="150">规格</th>
                <th width="150">单位</th>
                <th width="90">销售数量</th>
                <th width="130">销售金额</th>
                <th width="150">折扣金额</th>
                <th width="150">销售毛利</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" v-for="(item,index) in result">
                <td>{{index+1}}</td>
                <td>{{item.clNumber}}</td>
                <td>{{item.clName}}</td>
                <td>{{item.clSpec}}</td>
                <td>{{item.clUnit}}</td>
                <td>{{item.sh_sell_count}}</td>
                <td>{{item.sh_money}}</td>
                <td>{{item.sh_discount}}</td>
                <td>{{item.sh_profit}}</td>
            </tr>
            </tbody>
        </table>
    </div>
    <div id="pagenav" style="text-align: center"></div>
</div>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script>
    var app = new Vue({
        el:'#app',
        data:{
            result:[]
        }
    });

    var getFcPageList = function(curr) {
        $.ajax({
            type:'post',
            dataType:'json',
            url:'/cargomanagement/purchase-order/selectsaleMap',
            data:{
                pageNum: curr || 1,
                pageSize:5
            },
            success:function(msg){
                app.result = msg.purch;
                laypage({
                    cont:'pagenav',
                    pages:msg.pages,
                    first:'首页',
                    last:'尾页',
                    skin: '#00A0E9',
                    curr: curr || 1,
                    jump: function (obj, first) {
                        if (!first) {
                            getFcPageList(obj.curr);
                        }
                    }
                });
            }
        });
    };

    getFcPageList();

    /*搜索*/
    $("#findempl").click(function () {
        getFcPageList();
    });
</script>


<!--<script type="text/javascript">

    var app = new Vue({
        el : '#app',
        data : {
            result : [],
            results:[]
        }
    });

    //查询商品数据
    var getCommdityPageList = function (curr) {
        getCommdityPageLis(curr);
        getCommdityPageLi(curr);
    };
    var getCommdityPageLis = function(curr) {
        $.ajax({
            type : "post",
            dataType : "json",
            url : "/reportanalysis/Purch/getallbypurch",
            data : {
                current:curr || 1,
                size:2,
                poNumber:"0",
                poSupName:"供"
            },

            success : function(msg) {
                console.log(msg);
                app.result=msg.comlist;
                console.log(msg.pages)
                laypage({
                    cont : 'pagenav', //容器。值支持id名、原生dom对象，jquery对象,
                    pages : msg.pages, //总页数
                    first : '首页',
                    last : '尾页',
                    curr : curr || 1, //当前页
                    jump : function(obj, first) { //触发分页后的回调
                        if (!first) { //点击跳页触发函数自身，并传递当前页：obj.curr
                            getCommdityPageList(obj.curr);
                        }
                    }
                });
            }
        });
    };
    var getCommdityPageLi = function(curr) {
        $.ajax({
            type : "post",
            dataType : "json",
            url : "/cargomanagement/purchase-order/getPage",
            data : {
                current:curr || 1,
                size:2,
                poNumber:"0",
                poSupName:"供"
            },
            success : function(msg) {
                console.log(msg);
                app.result=msg.list;
                console.log(app.result)
            }
        });
    };
    getCommdityPageList();
   /* $("#findempl").on('click', function () {
        getPurchasePageList();
    });


    var Excel_out =function () {
        window.location.href="/reportanalysis/rep_admin_list/export";
    }*/

</script>-->
</body>
</html>